<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.front.servlets.trading.ajax.JymmExists"%>
<%@page import="com.blockchain.front.servlets.security.UpdateBank"%>
<%@page import="com.blockchain.front.service.security.entity.BankCard"%>
<%@page import="com.blockchain.front.service.security.entity.BankEntity"%>
<%@page import="com.blockchain.front.service.security.SecurityManage"%>
<%@page import="com.blockchain.common.enums.JymmType"%>
<%@page import="com.blockchain.common.enums.IsPass"%>
<html>
<head>
<%
String str = languageDefine.getValue(request, "bankCarManagement_bankCarManagement");
String _TITLE_ = str + "- "+configureProvider.getProperty(SystemVariable.SITE_NAME);
CURRENT_SUB_CATEGORY="YHKGL"; 
PC_TITLE_NAME="YHKGL";
SecurityManage manage = serviceSession.getService(SecurityManage.class);
UserManage umanage = serviceSession.getService(UserManage.class);
BankEntity[] banks=manage.getBank(); 
User us=umanage.getUser();
BankCard[] bs=manage.bankList();
%>
<title><%=_TITLE_ %></title>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
</head>
<%@include file="/WEB-INF/include/header.jsp"%>
<%@include file="/WEB-INF/include/authenticatedSession.jsp"%>
<div class="autobox">
 <div class="now">
<a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.Index.class)%>" class="orange"><%=languageDefine.getValue(request, "menu_home")%></a>&gt; <a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.security.index.class)%>" class="orange"><%=languageDefine.getValue(request, "menu_safeCenter")%></a> &gt; <%=languageDefine.getValue(request, "bankCarManagement_bankCarManagement")%>
 </div>
 <div class="assets_center clear po_re zin70">
  <%@include file="/WEB-INF/include/aqzx/left.jsp"%>
<div class="assets_content w900 right bg_w">
   <div class="safe_center clear" style="padding-left: 0px;">
    <h1 style="margin-top: 0px; margin-bottom: 15px; line-height: 15px;"><%=languageDefine.getValue(request, "bankCarManagement_bankCarManagement")%></h1>
   </div>
   <div class="cnyin_record" style="width: 918px;">
    <div class="f_body">
     <div class="f_body_main">
      <div class="f_tab_body">
       <div>
        <table class="f_table" id="investLog_content">
         <thead>
          <tr>
           <th><%=languageDefine.getValue(request, "bankCarManagement_tag")%></th>
           <th><%=languageDefine.getValue(request, "bankCarManagement_bank")%></th>
           <th><%=languageDefine.getValue(request, "bankCarManagement_province")%></th>
           <th><%=languageDefine.getValue(request, "bankCarManagement_city")%></th>
           <th><%=languageDefine.getValue(request, "bankCarManagement_accountBranch")%></th>
           <th><%=languageDefine.getValue(request, "bankCarManagement_bankCarNum")%></th>
           <th><%=languageDefine.getValue(request, "bankCarManagement_addTime")%></th>
           <th><%=languageDefine.getValue(request, "bankCarManagement_operating")%></th>
          </tr>
         </thead>
         <tbody>
         <%if(bs!=null){for(BankCard b:bs  ){ %>
            <tr>
              <td><%StringHelper.filterHTML(out, b.bq);%></td>
              <td><%StringHelper.filterHTML(out, b.yh);%></td>
              <td><%StringHelper.filterHTML(out, b.sheng);%></td>
              <td><%StringHelper.filterHTML(out, b.shi);%></td>
              <td><%StringHelper.filterHTML(out, b.khzh);%></td>
              <td><%StringHelper.filterHTML(out, b.kh);%></td>
              <td><%=TimestampParser.format(b.sj)%></td>
              <td><a href="<%=controller.getURI(request, UpdateBank.class)%>?id=<%=b.id%>"><%=languageDefine.getValue(request, "bankCarManagement_delete")%></a></td>
            </tr>
            <%}}%>
          </tbody>
        </table>
        <div class="pages">
         <a href="javascript:void(0)" onclick="showA()"><%=languageDefine.getValue(request, "bankCarManagement_addOneAddress")%></a>
        </div>
       </div>
      </div>
     </div>
    </div>
   </div>
  </div>  
 </div>
</div>
 <form id="form-pw" class="pw" action="<%=controller.getURI(request, Bank.class)%>" method="post" onsubmit="return onSubmit()" >
<div class="okcoinPop" id="withdrawCnyAddress" style="display: none;">
 <div class="dialog_content" id="dialog_content_CnyAddress" style="margin-left: -200px; margin-top: 200px; left: 50%; top: 21px;">
  <div class="dialog_title" id="dialog_title_CnyAddress">
   <span id="CnyAddressTitle"><%=languageDefine.getValue(request, "bankCarManagement_addOneBankAddress")%></span> <a href="javascript:closeAddress();" class="dialog_closed" title='<%=languageDefine.getValue(request, "bankCarManagement_close")%>'></a>
  </div>
  <div class="dialog_body center">
   <div style="line-height: 35px; text-align: left; padding-left:40px;">
    <ul class="PopLayer">
     <li>
       <span class="c2" id="lotteryAmountSpan1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=languageDefine.getValue(request, "bankCarManagement_tag")%>:</span>
       <input name="bq" id="bank_name" type="text" class="cztxinput" style="width: 217px; padding: 2px; padding-bottom: 5px;">
    </li>
     <li>
       <span class="c2" id="lotteryAmountSpan2"><%=languageDefine.getValue(request, "bankCarManagement_bank")%>:</span>
       <select name="yhid" id="bank_bank" style="width: 110px;">
         <option value="">--请选择--</option>
        	<%if(banks!=null){for(BankEntity b:banks  ){ %>
         <option value="<%=b.id%>"><%StringHelper.filterHTML(out, b.name);%></option>
          <%}}%>
       </select>
      
      </li>
     <li>
       <span class="c2" id="lotteryAmountSpan3"><%=languageDefine.getValue(request, "bankCarManagement_province")%>:</span>
       <span class="controls" id="city_1">
       <select class="prov" id="bank_bankprov" name="sheng" style="width: 110px;"></select>
       <select class="city" id="bank_bankcity" name="shi" style="width: 110px; display: none;">
       </select>
       </span>
      </li>
     <li>
       <span class="c2" id="lotteryAmountSpan4"><%=languageDefine.getValue(request, "bankCarManagement_accountBranch")%>:</span>
       <input name="khzh" id="bank_bankaddr" type="text" class="cztxinput" style="width: 217px; padding: 2px; padding-bottom: 5px;">
     </li>

     <li>
       <span class="c2" id="lotteryAmountSpan5"><%=languageDefine.getValue(request, "bankCarManagement_name")%>:</span> <%StringHelper.filterHTML(out, us.name);%>
     </li>

     <li>
       <span class="c2" id="lotteryAmountSpan6"><%=languageDefine.getValue(request, "bankCarManagement_bankCar")%>:</span>
       <input name="kh" id="bank_bankcard" type="text" class="cztxinput" style="width: 217px; padding: 2px; padding-bottom: 5px;">
     </li>

     <li>
       <span class="c2" id="lotteryAmountSpan7"><%=languageDefine.getValue(request, "bankCarManagement_tradePassword")%>:</span>
       <input name="jymm" id="bank_paypassword" type="password" class="cztxinput" style="width: 100px; padding: 2px; padding-bottom: 5px;"><span style="padding-left:5px;color:#999;font-size:14px;">（<%=languageDefine.getValue(request, "bankCarManagement_plantomTradePassword")%>）</span> <!-- a href="/Login/findpaypwd.html" class="reg_floatr">忘记?</a-->
     </li>
     <li>
     <input type="submit" value='<%=languageDefine.getValue(request, "bankCarManagement_addNow")%>' class="btn" id="btn">
     </li>
    </ul>
   </div>
  </div>
 </div>
</div>
<div id="dialogBoxShadow" style="position: absolute; top: 0px; left: 0px; z-index: 100; background-color: rgb(0, 0, 0); opacity: 0.4; width: 100%; background-position: initial initial; background-repeat: initial initial; display: none;"></div>
</form>
<%@include file="/WEB-INF/include/footer.jsp"%>
<%@include file="/WEB-INF/include/script.jsp"%>
<script type="text/javascript" src="<%=controller.getStaticPath(request)%>/js/cityselect.js"></script>
<script>
var url='<%=controller.getURI(request,JymmExists.class)%>';
 $("#city_1").citySelect({nodata:"none",required:false});
 function showA(){
 $("#withdrawCnyAddress").show();
 $('#dialogBoxShadow').height($(document).height());
 $("#dialogBoxShadow").show();
  var bank_num = $("#investLog_content tbody").find("tr").length;
  bank_num = bank_num + 1
  $('#bank_name').val('<%=languageDefine.getValue(request, "bankCarManagement_bankCar")%>'+bank_num).css("color","#bcbaba");
 }

 function onSubmit(){
  var name=$('#bank_name').val();
  var bank=$('#bank_bank option:selected').val();
  var bankprov=$('#bank_bankprov option:selected').val();
  var bankcity=$('#bank_bankcity option:selected').val();
  var bankaddr=$('#bank_bankaddr').val();
  var bankcard=$('#bank_bankcard').val();
  var paypassword=$('#bank_paypassword').val();
  if(name==""||name==null){
   layer.tips('<%=languageDefine.getValue(request, "js_enterNotes")%>','#bank_name',{tips:3});
   return false;
  }
  if(bankaddr==""||bankaddr==null){
   layer.tips('<%=languageDefine.getValue(request, "js_enterBankBranch")%>','#bank_bankaddr',{tips:3});
   return false;
  }
  if(bankcard==""||bankcard==null){
   layer.tips('<%=languageDefine.getValue(request, "js_enterBankAccount")%>','#bank_bankcard',{tips:3});
   return false;
  }
  if(paypassword==""||paypassword==null){
   layer.tips('<%=languageDefine.getValue(request, "js_tradePassword")%>','#bank_paypassword',{tips:3});
   return false;
  }
 }

<%String error = controller.getPrompt(request,response,PromptLevel.ERROR);if(!StringHelper.isEmpty(error)){%>
	layer.open({
	title: '<%=languageDefine.getValue(request, "js_tip")%>',
	content: '<%=languageDefine.getValue(request, error)%>'
}); 
	showA();
<%}%>
</script>
